﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entities
{
    public enum TypePlat
    {
        Entrée,
        PlatPrincipal,
        Dessert,
        Boisson,
        Autres
    }

    public partial class Plat
    {
        //wrappers
        public TypePlat getType()
        {
            switch (this.Type)
            {
                case "Entrée":
                    return TypePlat.Entrée;
                case "PlatPrincipal":
                    return TypePlat.PlatPrincipal;
                case "Dessert":
                    return TypePlat.Dessert;
                case "Boisson":
                    return TypePlat.Boisson;
                default:
                    return TypePlat.Autres;
            }
        }
        public void setType(TypePlat typePlat)
        {
            this.Type = typePlat.ToString();
        }
    }
}
